<%
	def transcation = request.transcation
%>
<form class="form-1" method="post" id="form0" action="transcationUpdate.groovy">
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
	<td colspan="2">&nbsp;</td>
</tr>
<tr>
	<td align=left width="15%"><span class="label">Expenses Id *</span></td>
	<td>
		<span class="value">$transcation.key.id</span>
		<input type="hidden" name="transcationKey" value="${transcation.key.id}"/>
	</td>
</tr>
<tr>
	<td colspan="2">&nbsp;</td>
</tr>
<tr>
	<td align=left><span class="label">Amount *</span></td>
	<td align=left>
		<input type="text" name="transcationAmount" value="${transcation.amount}" size="6" id="transcationAamount" class="validate[required]" />
	</td>
</tr>
<tr>
	<td colspan="2">&nbsp;</td>
</tr>
<tr>
	<td align=left><span class="label">Description *</span></td>
	<td align=left>
		<input type="text" name="transcationDescription" value="${transcation.description}" size="120" id="transcationDescription" class="validate[required]" />
	</td>
</tr>
<tr>
	<td colspan="2">&nbsp;</td>
</tr>
<tr>
	<td align=left><span class="label">Tags *</span></td>
	<td align=left>
		<input type="text" name="transcationTags" value="${request.transcationTags}" size="60" id="transcationTags" />
	</td>
</tr>
<tr>
	<td colspan="2">&nbsp;</td>
</tr>
<tr>
	<td align="left"><span class="label">Date *</span></td>
	<td align="left">
		<input type="text" id="createdDate" name="transcationCreatedDateStg" value="${transcation.createdDateStg}" size="12" class="validate[required]"/>
		&nbsp;[YYYY-MM-DD]
		&nbsp;&nbsp;&nbsp;&nbsp;
		<span class="label">Time * &nbsp;&nbsp;</span>
		<input type="text" id="createdTime" name="transcationCreatedTimeStg" value="${transcation.createdTimeStg}" size="2"/>
		&nbsp;[HH:mm]
</tr>
<tr>
	<td colspan="2">&nbsp;</td>
</tr>
<tr>
	<td align="center">
		<input type="Reset" name="Reset" />
	</td>
	<td>
	<table width="100%" border="0" cellpadding="0 cellspacing="0" align="center">
    <tr> 
		<td width="15%">
			<input type="Submit" name="action" value="Update"/>
		</td>
		<td>
			<div class="normalbutton">
				<a href="transcationDelete.groovy?transcationKey=${transcation.key.id}">&#10007; Delete</a>
			</div>
		</td>
	</tr>
	</table> 
</td>
</tr>
</table>
</form>

<script type="text/javascript">
	\$(document).ready(function() {
	 	\$("#form0").validationEngine({	
	 		scroll : false,	
	 		inlineValidation : false 
	 	});
	 	
	 	\$("#createdDate").datepicker({
	 		dateFormat : "yy-mm-dd", 
	 		maxDate : 0, 
	 		constrainInput : false
	 	});

	 	\$('#createdTime').timepicker({});
	});
</script>